# Contributor: Henrik Riomar <henrik.riomar@gmail.com>
# Contributor:
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=wlroots0.15
pkgver=0.15.1
pkgrel=6
pkgdesc="Modular Wayland compositor library"
url="https://gitlab.freedesktop.org/wlroots/wlroots"
license="MIT"
arch="all"
makedepends="
	eudev-dev
	glslang-dev
	hwdata-dev
	libcap-dev
	libinput-dev
	libseat-dev
	libxcb-dev
	libxkbcommon-dev
	mesa-dev
	meson
	ninja
	pixman-dev
	vulkan-loader-dev
	wayland-dev
	wayland-protocols
	xcb-util-image-dev
	xcb-util-renderutil-dev
	xcb-util-wm-dev
	xkeyboard-config-dev
	xwayland-dev
	"
subpackages="$pkgname-dbg $pkgname-dev"
source="https://gitlab.freedesktop.org/wlroots/wlroots/-/archive/$pkgver/wlroots-$pkgver.tar.gz
	0001-wlr_output_commit_state_clear_back_buffer.patch
	"
options="!check" # no test suite
builddir="$srcdir/wlroots-$pkgver"

replaces="wlroots"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dexamples=false \
		. build
	meson compile -C build
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C build
}

sha512sums="
6228160f2f350a406c612f1048d7075cf2f78206cc84bc16f889d5d0acd614f9e98845fffed03d7067cfdbd7558b77fcc5d8cedc3868d866e476523126a63677  wlroots-0.15.1.tar.gz
5e163ed2b918287397cd7485207ea3ee19ef5585771c709f937b4dc442aa86153d9c8414295d336a9379896e1c9728614e6126d768c3efa6da41ef961d480970  0001-wlr_output_commit_state_clear_back_buffer.patch
"
